.TH ESTATS_FIND_VAR 3 "15 May 2011" "Estats Userland" "Estats"
.SH NAME
estats_agent_get_var_head, estats_var_next,
.RS 0
estats_agent_find_var_from_name \- find or iterate over TCP-Estats variables
.SH SYNOPSIS
.B #include <estats/estats.h>
.PP
.nf
.BI "estats_error* estats_agent_get_var_head(estats_var** " var ", const estats_agent* " agent ");"
.BI "estats_error* estats_var_next(estats_var** " var ", estats_var* " prev ");"
.BI "estats_error* estats_agent_find_var_from_name(estats_var** " var ", const estats_agent* " agent ", const char* " name ");"
.fi
.SH DESCRIPTION
TCP-Estats variables returned from the kernel are represented by the \fBestats_var\fR
struct. The above functions enable the searching and traversal of the list of variables.
.PP
\fBestats_agent_get_var_head()\fR obtains the first variable known to the \fIagent\fR;
\fBestats_var_next()\fR returns the variable subsequent to \fIprev\fR in the maintained list.
.PP
Upon obtaining the list head with \fBestats_agent_get_var_head()\fR, subsequent
variables may be iterated over with the provided macro \fBESTATS_VAR_FOREACH\fR.
.PP
\fBestats_agent_find_var_from_name()\fR searches for the \fIname\fR'd variable in
the list.
.SH RETURN VALUES
Each function returns a pointer to \fBestats_error\fR, \fBNULL\fR upon success.
.PP
The out parameter, \fIvar\fR, of each function is a pointer to the found \fBestats_var\fR
struct, \fBNULL\fR if none found.
.SH SEE ALSO
.BR libestats (3)
